import QtQuick 1.1
import com.nokia.meego 1.0

Page {
    id : root

    property int particlesCount: 100;
    property double particleSize: 2.0;
    property bool squareParticle : true;
    Column {
        id: column1
        width: 280
        anchors.verticalCenter: parent.verticalCenter
        anchors.horizontalCenter: parent.horizontalCenter
        spacing: 5

        SliderWithTitle {
            id : particleCountSlider;
            valueSliderText : "Particles count:"
            anchors.left: parent.left
            anchors.right: parent.right
            value : particlesCount
            maximumValue : 10000;
            minimumValue: 100;
            stepSize : 100;

        }

        SliderWithTitle {
            id : particleSizeSlider;
            valueSliderText : "Particle size:"
            anchors.left: parent.left
            anchors.right: parent.right
            value : particleSize;
            maximumValue : 10.0;
            minimumValue: 1.0;
            stepSize : 1.0;

        }

        CheckBox {
            id: squareParticleCheckBox
            text: "square particle"
            anchors.right: parent.right
            anchors.left: parent.left
            checked: squareParticle;
        }
    }

    tools: ToolBarLayout {
        id: pageSpecificTools
        ToolButton {
            iconSource: "toolbar-back";
            onClicked: goBack()
        }
    }

    function goBack() {
        window.particlesPage.particlesCount = particleCountSlider.value;
        window.particlesPage.particleSize = particleSizeSlider.value;
        window.particlesPage.squareParticle = squareParticleCheckBox.checked;
        root.pageStack.pop();
    }

}
